<template>
  <view class="leave-aplication flexc">
    <view class="flex1 over content">
      <view class="wrap">
        <view class="box">
          <view class="t">申请人</view>
          <view class="box-b">
            <input type="text" placeholder="请填写申请人" />
          </view>
        </view>
        <view class="box">
          <view class="t">学科岗位</view>
          <view class="box-b">
            <input type="text" placeholder="请填写学科岗位" />
          </view>
        </view>

        <view class="box">
          <view class="t">项目名称</view>
          <view class="box-b">
            <input type="text" placeholder="请填写项目名称" />
          </view>
        </view>
        <view class="box">
          <view class="t">成果类型</view>
          <view class="box-b">
            <input type="text" placeholder="请填写成果类型" />
          </view>
        </view>
        <view class="box">
          <view class="t">获奖等级</view>
          <view class="box-b">
            <input type="text" placeholder="请填写获奖等级" />
          </view>
        </view>
        <view class="box">
          <view class="t">次第</view>
          <view class="box-b">
            <input type="text" placeholder="请填写次第" />
          </view>
        </view>
        <view class="box">
          <view class="t">发证单位</view>
          <view class="box-b">
            <input type="text" placeholder="请填写发证单位" />
          </view>
        </view>

        <view class="box">
          <view class="t">获奖时间</view>
          <view class="box-b flex" @click="birthdayOpen(0)">
            <input
              type="text"
              disabled
              v-model="form.endDate"
              placeholder="请选择获奖时间" />
            <image src="/static/image/arrow.png" mode="aspectFit"></image>
          </view>
        </view>

        <view class="box">
          <view class="t">登记时间</view>
          <view class="box-b flex" @click="birthdayOpen(1)">
            <input type="text" disabled placeholder="请选择登记时间" />
            <image src="/static/image/arrow.png" mode="aspectFit"></image>
          </view>
        </view>
        <view class="box">
          <view class="t">学术积分</view>
          <view class="box-b">
            <input type="text" placeholder="请填写学术积分" />
          </view>
        </view>
        <view class="box">
          <view class="t">状态</view>
          <view class="box-b">
            <input type="text" placeholder="请填写状态" />
          </view>
        </view>
      </view>
    </view>
    <view class="btn">
      <view
        class=""
        @click="
          toRoue({
            path: 'refund-submit-success',
            query: {
              type: 3,
            },
          })
        ">
        立即申请
      </view>
    </view>

    <birthday_pop ref="birthday_pop" @confirm="birthdayConfirm" />
  </view>
</template>

<script>
import birthday_pop from "@/components/myInfo/birthday_pop.vue";
export default {
  components: {
    birthday_pop,
  },
  data() {
    return {
      show: false,
      form: {
        startDate: "",
        endDate: "",
      },
      saveIndex: 0,
    };
  },
  methods: {
    birthdayOpen(k) {
      console.warn("生日选择");
      this.$nextTick(() => {
        this.$refs.birthday_pop.init();
      });
      this.saveIndex = k;
    },
    birthdayConfirm(value) {
      if (this.saveIndex == 0) {
        this.form.startDate = value;
      } else {
        this.form.endDate = value;
      }
    },
  },
};
</script>

<style lang="scss" scoped>
.leave-aplication {
  width: 100%;
  height: 100%;
  background: #fff;
  box-sizing: border-box;
  padding-bottom: env(safe-area-inset-bottom);
  .content {
    background: #f6f6f6;
    padding: 24upx 32upx;
  }
  .wrap {
    background: #ffffff;
    border-radius: 24rpx 24rpx 24rpx 24rpx;
    padding: 36upx 24upx 4upx;
    .box {
      margin-bottom: 36upx;
      .t {
        font-weight: bold;
        font-size: 24rpx;
        color: #000000;
        margin-bottom: 12upx;
      }
      &-b {
        width: 100%;
        height: 72rpx;
        background: #f6f6f6;
        border-radius: 8rpx 8rpx 8rpx 8rpx;
        padding: 0 24upx;
        & > input {
          width: 100%;
          height: 100%;
          font-size: 24rpx;
        }
        & > image {
          width: 13rpx;
          height: 24rpx;
        }
      }
      .pc {
        color: #b3b9c9;
      }
    }
  }
  .btn {
    padding: 8upx 32upx;
    & > view {
      height: 80rpx;
      background: #f49c0d;
      border-radius: 64rpx 64rpx 64rpx 64rpx;
      width: 100%;
      text-align: center;
      line-height: 80upx;
      font-size: 28rpx;
      color: #ffffff;
    }
  }
}
</style>
